<!--{template header}-->
<style>
.relativecontent h2{
font-size:15px;
font-weight:700;
margin:10px auto;
}
.threads p {
    width: 370px;
    float: left;
    padding-right: 10px;
}
.threads {
    height: auto;
    overflow-y: visible;
}
</style>
<link rel="stylesheet" media="all" href="{SITE_URL}static/css/widescreen/css/search.css" />
<div class="container search">
<div class="row">
<div class="aside">
<!--{template tp_search}-->
 </div> <div class="col-xs-16 col-xs-offset-6 main">
 <div class="search-content"><!----> <div class="result">检索到{$rownum} 个结果</div>

  <!--{if $courseist}-->
    <div class="stream-list blog-stream">
                        <!--{loop $courseist $nindex $course}-->
              <section class="stream-list__item">
              <div class="blog-rank stream__item">
              <div data-id="1190000017247505" class="stream__item-zan   btn btn-default mt0">
              <span class="stream__item-zan-icon"></span>
              <span onclick="followcourse({$course['id']})" class="stream__item-zan-number followcourse{$course['id']}" title="共{$course['followers']}人关注">{$course['followers']}</span>
              </div></div>
              <div class="summary">
              <h2 class="title blog-type-common blog-type-1">
              <a href="{eval echo config_item('course_url').'course/view/'.$course['id'];}">{$course['name']}</a></h2>
              <ul class="author list-inline">
              <li>
              <a href="{url user/space/$course['authorid']}">
              <img class="avatar-24 mr10 " src="{$course['avatar']}" alt=" {$course['author']}">
              </a>
              <span style="vertical-align:middle;">
              <a href="{url user/space/$course['authorid']}"> {$course['author']}</a>
                    
                     
                                            </span>
                                                <span style="vertical-align:middle;margin-left:5px;">
          {$course['learners']}人学习
                    
                     
                                            </span>
                                            </li>
    </ul>
      <p class="excerpt wordbreak ">

                     {eval echo clearhtml($course['miaosu']);}
                 

  
  </p>
      </div>
      </section>
        <!--{/loop}-->
              </div>
   <!--{else}-->
       <div id="no-result">
                <p>抱歉，未找到和您搜索相关的内容。</p>
                <strong>建议您：</strong>
                <ul class="nav">
                    <li><span>检查输入是否正确</span></li>
                    <li><span>简化查询词或尝试其他相关词</span></li>
                </ul>
            </div>
    <!--{/if}-->

<div class="pages">  {$departstr}</div>

         </div>
         </div>
         </div>
         </div>
         <script>
         $(".note-list em").addClass("search-result-highlight");
         /*关注课程*/
         function followcourse(cid) {
             if (g_uid == 0) {
                 login();
             }
          
             $.post(g_site_url + "index.php?kecheng/followercourse", {cid: cid}, function(msg) {
            
                 if (msg == 'ok1') {
                     
                     var _follownum=$(".followcourse"+cid).html();
                     $(".followcourse"+cid).html(parseInt(_follownum)-1);
                     alert("取消关注");
             
             }else if(msg == 'ok2'){
            	 var _follownum=$(".followcourse"+cid).html();
                 $(".followcourse"+cid).html(parseInt(_follownum)+1);
                   alert("关注成功");
             }
             else{
             	if(msg == '-1'){
             		alert("先登录在关注");
             	}else{
             		alert(msg);
             	}
             }
             });
         }
         </script>
         
